<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="./vue2.js"></script>
    <div id="box">
        <input v-model="mytext" @input="handleInput()"/>
        <ul>
            <li v-for="(data,index) in datalist" :key="data">{{data}}-{{index}}</li>
        </ul>
    </div>

    <script>
        new Vue({
            el:'#box',
            data:{
                datalist:['aaa','bbb','ccc','asd','ffg','bde','sda'],
                oldlist:['aaa','bbb','ccc','asd','ffg','bde','sda'],
                mytext:'',
            },
            methods:{
                handleInput(){
                   this.datalist=this.oldlist.filter(item=>item.includes(this.mytext))
                }
            }
        })
        </script>
        
</body>
</html>